<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			.area{
				/* cursor: url('icon-gateway-on.ico'),auto; */
				border: 1px solid #eee;
				width: 800px;height: 600px;
			}
		</style>
	</head>
	<body>
		<div class="area">
			<p>自定义鼠标样式，兼容性最好的是.ico.cur格式图片，</p>
			<p>图片大小为32*32</p>
			<p></p>
			
		</div>
		<script type="text/javascript">
			var area = document.querySelector('.area')
			
			area.addEventListener('click',function(){
				if(!this.style.cursor){
					this.style.cursor = "url('icon-gateway-on.ico'),auto"
				}else{
					this.style.cursor = ''
				}
			})
		</script>
	</body>
</html>
